﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:bam="clr-namespace:Brain.Animate">


    <!-- DropShaddow with a square shaddow -->
    <Style TargetType="bam:DropShaddow" >
        <Setter Property="OffsetX" Value="5"/>
        <Setter Property="OffsetY" Value="5"/>
        <Setter Property="Padding" Value="12" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="bam:DropShaddow">
                    <Grid Margin="{TemplateBinding Padding}">
                        <Border x:Name="Shaddow" Background="#229C9C9C" />
                        <ContentPresenter x:Name="ContentPresenter"
                            Content="{TemplateBinding Content}" 
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CircleDropShaddowStyle" TargetType="bam:DropShaddow" >
        <Setter Property="OffsetX" Value="0"/>
        <Setter Property="OffsetY" Value="0"/>
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="bam:DropShaddow">
                    <Grid Margin="{TemplateBinding Padding}"
							HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
							>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="90*"/>
                            <RowDefinition Height="10*"/>
                        </Grid.RowDefinitions>
                        <Image 
                            x:Name="Shaddow" 
                            Grid.Row="1"
                            Source="/Images/OvalShaddow.png" Stretch="Fill" VerticalAlignment="Bottom" Margin="12,0" />
                        <ContentPresenter 
                            x:Name="ContentPresenter"
                            Grid.Row="0" Grid.RowSpan="2"
                            Content="{TemplateBinding Content}" 
                            />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    
    <Style TargetType="bam:PanControl">
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="bam:PanControl">
                    <Grid>
                        <ContentPresenter 
                            x:Name="ContentPresenter" Content="{TemplateBinding Content}" 
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            />
                        <ContentPresenter 
                            x:Name="OtherContentPresenter" Content="{TemplateBinding OtherContent}" 
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="bam:AnimationFrame">
        <Setter Property="Background" Value="{StaticResource PhoneBackgroundBrush}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="bam:AnimationFrame">
                    <Border
                        x:Name="ClientArea"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Margin="{TemplateBinding Margin}">
                        <Grid>
                            <ContentPresenter
                                x:Name="FirstContentPresenter"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            <ContentPresenter
                                x:Name="SecondContentPresenter"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
